package com.redis.example.controller;

import com.redis.example.bean.User;
import com.redis.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author H
 * @date 2023/1/4
 */
@RestController
public class TestCacheAnnotationController {

    @Autowired
    private UserService userService;

    @GetMapping("insertCache")
    public User testInsertCache() {
        return userService.testInsertCache();
    }

    @GetMapping("getCache")
    public User testGetCache() {
        return userService.testGetCache();
    }

}
